Guiding Large Language Models in Modeling Optimization Problems via Question Partitioning

, , , , , ,

Optimization problems are ubiquitous across various domains, such as resource scheduling, production planning, and sales management. Traditionally, they are modeled manually, leading to inefficiencies due to difficulties in communication and collaboration between modeling and domain experts. The emergence of large language models (LLMs) has made automated modeling possible. However, real-world applications are often large-scale and have numerous variables and constraints, limiting the applicability of existing methods. To address this, we propose PAMOP, a novel modeling framework based on LLMs, to model optimization problems automatically, given only natural language descriptions. Specifically, we extract and partition the problems using a tree structure, guiding the LLMs to model each set of constraints with self-augmented prompts, thus reducing the demands on the LLM's capabilities of large contents. The mathematical model is then iteratively corrected and validated through our correction procedures. The experiments demonstrate that our method improves performance on the common benchmark dataset NLP4LP, achieving an accuracy of 62.3% and a code executability rate of 86.8% when tested on GPT-4. Additionally, we demonstrate the effectiveness of our pamop in handling large real-world problems.

» Read on
Xiaotian Pan, Junhao Fang, Feng Wu, Sijia Zhang, Yi-Xiang Hu, Shaoang Li, Xiang-Yang Li. Guiding Large Language Models in Modeling Optimization Problems via Question Partitioning. In Proceedings of the 34th International Joint Conference on Artificial Intelligence (IJCAI), Montreal, Canada, August 2025.
Save as file
@inproceedings{PFWijcai25,
 address = {Montreal, Canada},
 author = {Xiaotian Pan and Junhao Fang and Feng Wu and Sijia Zhang and Yi-Xiang Hu and Shaoang Li and Xiang-Yang Li},
 booktitle = {Proceedings of the 34th International Joint Conference on Artificial Intelligence (IJCAI)},
 month = {August},
 title = {Guiding Large Language Models in Modeling Optimization Problems via Question Partitioning},
 year = {2025}
}